﻿using System;
using WinRTFramework.Common;
using WinRTFramework.Contracts.Settings;
using WinRTFramework.Interfaces.Contracts.Settings.ViewModel;
using Windows.UI.Xaml.Media;

namespace ApplicationSettings.ViewModels
{
    class ContextSpecificSettingsViewModel : ISupportSettingsFlyout
    {
        private Action<Brush> _changeColorDelegate = delegate { };

        public int DisplayOrder
        {
            get { return 0; }
        }

        public string Label
        {
            get { return "Change context specific Settings"; }
        }

        public SettingsFlyoutSize Size
        {
            get { return SettingsFlyoutSize.Small; }
        }

        public DelegateCommand ReturnToSettingsCommand { get; set; }

        private DelegateCommand<Brush> _changeColorCommand;
        public DelegateCommand<Brush> ChangeColorCommand
        {
            get { return _changeColorCommand = _changeColorCommand ?? new DelegateCommand<Brush>(_changeColorDelegate); }
        }

        public Action<Brush> ChangeColorDelegate
        {
            set { _changeColorDelegate = value; }
        }
    }
}
